import vue from 'rollup-plugin-vue';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import babel from 'rollup-plugin-babel';

export default {
  input: {
    'v2/openComp': './packages/openCompForEU.js',
    'v3/openComp': './packages/openCompForEP.js',
    'react/openComp': './packages/openCompForAT.js'
  }, // 入口文件
  output: [
    {
      format: 'es',
      dir: 'dist'
    },
  ],
  external: ['react', 'react-dom'],
  plugins: [
    vue({
      compileTemplate: true,
      css: true
    }),
    babel({
      exclude: 'node_modules/**',
      babelrc: false,
      presets: [['@babel/preset-env', { modules: false }]],
    }),
    resolve(),
    commonjs(),
  ]
};